package com.hyzh.latte.util.gather;

import com.hyzh.latte.vehicle.dmo.PersonGatherDTO;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * @author songkui
 * @since 2024/5/11 15:38
 */
@EqualsAndHashCode(of ={"lat", "lon"})
@Getter
@Setter
public class Point {

    private double lat;
    private  double lon;

    public Point(double lat, double lng) {
        this.lat = lat;
        this.lon = lng;
    }

    public PersonGatherDTO buildDTO(int num){
        PersonGatherDTO dto = new PersonGatherDTO();
        dto.setLat(String.valueOf(this.lat));
        dto.setLon(String.valueOf(this.lon));
        dto.setPersonNum(num);
        return dto;
    }

}
